//
//  HQDataBaseOperate.h
//  OldHandPT
//
//  Created by ben on 2018/12/14.
//  Copyright © 2018 Shouny. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <FMDB.h>
#import "COneAnsionModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface HQDataBaseOperate : NSObject
# pragma mark 用户数据库
@property (nonatomic, strong)FMDatabase *userDB;
# pragma mark *********************数据库公共部分*******************
#pragma mark 单例
+(HQDataBaseOperate *)sharedDataBase;
# pragma mark 公共数据库
@property (nonatomic, strong) FMDatabase *publicDB;
#pragma mark 检测SandBox中是否有用户名相关数据库文件，没有从资源库拷贝到SandBox
- (void)checkUserDatabase:(NSString *)userId;
# pragma mark 删除数据库内所有的数据
+(BOOL)deleteAllDataBase;
# pragma mark 删除数据库内所有的数据除公共表
+(BOOL)deleteAllDataBaseWithOutPubulic;
# pragma mark 数据库版本更新
-(BOOL)updataVersion;
# pragma mark 公共数据库版本更新
-(BOOL)updataPublicVersion;


#pragma mark - C1题库表
// 更新
+(BOOL)queryCOneWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllCOneMessage;

+(BOOL)queryCTwoWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllCTwoMessage;

+(BOOL)queryBOneWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllBOneMessage;

+(BOOL)queryBTwoWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllBTwoMessage;

+(BOOL)queryAOneWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllAOneMessage;

+(BOOL)queryATwoWithFromUserID:(COneAnsionModel *)model;
+(NSArray *)queryAllATwoMessage;
@end

NS_ASSUME_NONNULL_END
